""Some settings used by hbzhao
""显示行数
set number               

""语法高亮, 配色方案
syntax on
colorscheme elflord

""统一缩进, 宽度为4             
set softtabstop=4       
set shiftwidth=4 

""总显示状态行, 显示文件路径和行列数
set laststatus=2
set statusline=[%F]%m%=[Row:%l/%L,Col:%c][%p%%]

""设置快捷键窗口之间移动光标
map <c-j> <c-w>j
map <c-k> <c-w>k
map <c-l>  <c-w>l
map <c-h> <c-w>h

""设置<ESC>快捷键
inoremap ;; <ESC>

""显示中文
let &termencoding=&encoding
set fileencodings=utf-8,gbk,ucs-bom,cp936

""支持鼠标
set mouse=a

""设置要安装的插件列表
call plug#begin('~/.vim/plugged')
Plug 'esukram/vim-taglist'
Plug 'ctrlpvim/ctrlp.vim'

Plug 'tpope/vim-git'
Plug 'gregsexton/gitv'
Plug 'rking/ag.vim'
Plug 'tpope/vim-fugitive'

Plug 'majutsushi/tagbar'
call plug#end()

""设置plug-vim快捷键及属性
map  <F5>       :PlugInstall <CR>
map! <F5> <ESC> :PlugInstall <CR>

""设置ctags快捷键及属性
let MSG="ctags -I __THROW --file-scope=yes --langmap=c:+.h --languages=c,c++ --links=yes   --c-kinds=+p --fields=+S -R -f ~/.vim/systags  /usr/include /usr/local/include /opt/vc/include  /usr/lib/arm-linux-gnueabihf"
map  <F2>       :! ctags -R <CR>
map! <F2> <ESC> :! ctags -R <CR>

set tags=./.tags;,.tags
set tags+=~/.vim/systags
set autochdir

""设置taglist快捷键及属性
map  <F3>       :Tlist <CR><ESC>
map! <F3> <ESC> :Tlist <CR>

let Tlist_Use_Left_Window=1  "在左侧显示taglist窗口
let Tlist_Show_One_File=1    "只显示当前文件的tags
let Tlist_WinWidth=40        "设置taglist宽度
let Tlist_Exit_OnlyWindow=1  "退出Vim时tagList窗口是最后一个

